<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>日志存储、图片处理与备份方案 | 技术小馆</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        h1, h2, h3, h4, h5, h6 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .code-block {
            background-color: #2d3748;
            color: #f7fafc;
            border-radius: 0.5rem;
        }
        .mermaid {
            background-color: white;
            border-radius: 0.5rem;
            padding: 1rem;
        }
        .drop-cap::first-letter {
            font-size: 3.5rem;
            float: left;
            line-height: 0.8;
            margin: 0.15em 0.1em 0 0;
            color: #4f46e5;
            font-weight: 700;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-4 md:px-0">
        <div class="container mx-auto max-w-5xl">
            <div class="flex flex-col md:flex-row items-center">
                <div class="md:w-2/3 md:pr-10">
                    <h1 class="text-4xl md:text-5xl font-bold mb-6 leading-tight">日志存储、图片处理与备份方案</h1>
                    <p class="text-xl mb-8 opacity-90">现代应用开发的三大核心功能：高效日志存储、智能图片处理与可靠数据备份</p>
                    <div class="flex flex-wrap gap-3">
                        <span class="px-4 py-2 bg-white bg-opacity-20 rounded-full text-sm font-medium">OSS存储</span>
                        <span class="px-4 py-2 bg-white bg-opacity-20 rounded-full text-sm font-medium">CDN加速</span>
                        <span class="px-4 py-2 bg-white bg-opacity-20 rounded-full text-sm font-medium">数据备份</span>
                        <span class="px-4 py-2 bg-white bg-opacity-20 rounded-full text-sm font-medium">Elasticsearch</span>
                    </div>
                </div>
                <div class="md:w-1/3 mt-10 md:mt-0">
                    <div class="bg-white bg-opacity-10 p-6 rounded-xl backdrop-blur-sm">
                        <h3 class="text-xl font-semibold mb-3">关键要点</h3>
                        <ul class="space-y-2">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-300 mt-1 mr-2"></i>
                                <span>OSS低成本日志存储策略</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-300 mt-1 mr-2"></i>
                                <span>图片动态处理与CDN优化</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-300 mt-1 mr-2"></i>
                                <span>跨地域数据备份方案</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-300 mt-1 mr-2"></i>
                                <span>冷热数据分层存储架构</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <main class="container mx-auto max-w-5xl py-12 px-4 md:px-0">
        <!-- Introduction -->
        <section class="mb-16">
            <p class="text-lg text-gray-700 drop-cap">在现代应用开发中，日志存储、图片处理和数据备份是不可或缺的三大核心功能。高效的日志存储可以帮助开发者快速定位问题，优化系统性能；智能的图片处理方案可以提升用户体验，同时降低存储和传输成本；可靠的数据备份策略则能保证数据的持久性，防止数据丢失或损坏。</p>
        </section>

        <!-- Section 1: Log Storage -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="bg-indigo-100 w-12 h-12 rounded-lg flex items-center justify-center mr-4">
                    <i class="fas fa-file-alt text-indigo-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">一、日志存储方案</h2>
            </div>

            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8 card-hover">
                <div class="p-6">
                    <h3 class="text-xl font-semibold mb-4 text-indigo-600 flex items-center">
                        <i class="fas fa-exclamation-triangle mr-2"></i> 1.1 日志存储的挑战
                    </h3>
                    <p class="text-gray-700 mb-4">日志在企业级系统中的作用非常重要，但通常会面临以下问题：</p>
                    <ul class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
                        <li class="flex items-start">
                            <i class="fas fa-dollar-sign text-red-500 mt-1 mr-2"></i>
                            <span class="font-medium">存储成本高</span>：日志数据量庞大，如果长期存储在高性能磁盘上，成本昂贵。
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-search text-blue-500 mt-1 mr-2"></i>
                            <span class="font-medium">查询性能低</span>：随着日志数量增长，查询变慢，影响故障排查效率。
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-calendar-alt text-purple-500 mt-1 mr-2"></i>
                            <span class="font-medium">数据生命周期管理复杂</span>：需要定期清理或归档旧日志。
                        </li>
                    </ul>
                </div>
            </div>

            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8 card-hover">
                <div class="p-6">
                    <h3 class="text-xl font-semibold mb-4 text-indigo-600 flex items-center">
                        <i class="fas fa-cloud-upload-alt mr-2"></i> 1.2 适合 OSS 的日志存储策略
                    </h3>
                    <p class="text-gray-700 mb-4">使用 <span class="font-bold text-indigo-600">OSS 进行日志存储</span> 具有 <span class="font-bold">成本低、容量弹性、可靠性高</span> 等优势，适用于 <span class="font-bold">长时间存档、批量查询</span> 的日志分析场景。</p>
                    
                    <h4 class="font-semibold text-lg mb-2 mt-6 text-gray-800">日志存储结构设计</h4>
                    <p class="text-gray-700 mb-4">可以采用 <span class="font-bold">按时间、模块、环境划分日志存储路径</span>，示例如下：</p>
                    
                    <div class="code-block p-4 mb-6 rounded-lg">
                        <code class="text-sm text-gray-200">/logs/{app_name}/{env}/{yyyy-MM}/{dd}/logfile.log</code>
                    </div>
                    
                    <p class="text-gray-700 mb-4">例如，存储 2025 年 3 月 1 日的日志：</p>
                    
                    <div class="code-block p-4 mb-6 rounded-lg">
                        <code class="text-sm text-gray-200">/logs/order-service/prod/2025-03/01/app.log</code>
                    </div>

                    <h4 class="font-semibold text-lg mb-2 mt-6 text-gray-800">使用 Java SDK 上传日志到 OSS</h4>
                    <div class="code-block p-4 mb-6 rounded-lg overflow-x-auto">
                        <pre class="text-sm"><code>String bucketName = "my-log-bucket";
String objectName = "logs/order-service/prod/2025-03/01/app.log";
String filePath = "/var/logs/app.log";

OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
ossClient.putObject(bucketName, objectName, new File(filePath));
ossClient.shutdown();
System.out.println("日志上传成功！");</code></pre>
                    </div>

                    <h4 class="font-semibold text-lg mb-2 mt-6 text-gray-800">日志查询优化</h4>
                    <p class="text-gray-700 mb-4">由于 OSS 适用于大规模日志存储，但 <span class="font-bold">不适合实时查询</span>，因此可结合 <span class="font-bold">Elasticsearch + OSS</span> 构建 <span class="font-bold">冷热数据分层存储</span> 方案：</p>
                    
                    <div class="bg-blue-50 p-4 rounded-lg mb-6">
                        <ol class="list-decimal pl-5 space-y-2">
                            <li><span class="font-medium">最近 7 天日志存入 Elasticsearch</span>，支持高效查询。</li>
                            <li><span class="font-medium">超过 7 天的日志存入 OSS 归档存储</span>，降低存储成本。</li>
                            <li><span class="font-medium">需要查询历史日志时，通过异步任务从 OSS 加载到临时存储进行分析</span>。</li>
                        </ol>
                    </div>

                    <div class="mermaid mb-6">
                        graph LR
                            A[应用日志] --> B{日志分类}
                            B -->|7天内| C[Elasticsearch<br>热数据]
                            B -->|7天以上| D[OSS 归档存储<br>冷数据]
                            C --> E[实时查询]
                            D --> F[异步加载查询]
                    </div>

                    <h4 class="font-semibold text-lg mb-2 mt-6 text-gray-800">日志清理策略</h4>
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
                        <div class="bg-white border border-gray-200 rounded-lg p-4 shadow-sm">
                            <h5 class="font-semibold text-indigo-600 mb-2">短期存储 (7 天内)</h5>
                            <p class="text-gray-700">保留在本地或 Elasticsearch 中，便于快速查询。</p>
                        </div>
                        <div class="bg-white border border-gray-200 rounded-lg p-4 shadow-sm">
                            <h5 class="font-semibold text-indigo-600 mb-2">中期存储 (30 天内)</h5>
                            <p class="text-gray-700">存入 OSS 标准存储，支持快速恢复。</p>
                        </div>
                        <div class="bg-white border border-gray-200 rounded-lg p-4 shadow-sm">
                            <h5 class="font-semibold text-indigo-600 mb-2">长期存储 (90 天以上)</h5>
                            <p class="text-gray-700">转为 OSS 低频访问存储(IA)或归档存储，减少存储成本。</p>
                        </div>
                    </div>

                    <h4 class="font-semibold text-lg mb-2 mt-6 text-gray-800">配置日志生命周期策略</h4>
                    <div class="code-block p-4 rounded-lg overflow-x-auto">
                        <pre class="text-sm"><code>&lt;LifecycleConfiguration&gt;
    &lt;Rule&gt;
        &lt;ID&gt;LogRule&lt;/ID&gt;
        &lt;Prefix&gt;logs/&lt;/Prefix&gt;
        &lt;Status&gt;Enabled&lt;/Status&gt;
        &lt;Transition&gt;
            &lt;Days&gt;30&lt;/Days&gt;
            &lt;StorageClass&gt;IA&lt;/StorageClass&gt;
        &lt;/Transition&gt;
        &lt;Transition&gt;
            &lt;Days&gt;90&lt;/Days&gt;
            &lt;StorageClass&gt;Archive&lt;/StorageClass&gt;
        &lt;/Transition&gt;
        &lt;Expiration&gt;
            &lt;Days&gt;180&lt;/Days&gt;
        &lt;/Expiration&gt;
    &lt;/Rule&gt;
&lt;/LifecycleConfiguration&gt;</code></pre>
                    </div>
                </div>
            </div>
        </section>

        <!-- Section 2: Image Processing -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="bg-blue-100 w-12 h-12 rounded-lg flex items-center justify-center mr-4">
                    <i class="fas fa-image text-blue-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">二、图片处理方案</h2>
            </div>

            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8 card-hover">
                <div class="p-6">
                    <h3 class="text-xl font-semibold mb-4 text-blue-600 flex items-center">
                        <i class="fas fa-exclamation-triangle mr-2"></i> 2.1 图片存储的挑战
                    </h3>
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-4 mb-4">
                        <div class="flex items-start">
                            <i class="fas fa-tachometer-alt text-purple-500 mt-1 mr-2"></i>
                            <span class="font-medium">高吞吐量</span>：电商、社交等业务需要存储海量用户上传的图片，存储压力大。
                        </div>
                        <div class="flex items-start">
                            <i class="fas fa-file-image text-green-500 mt-1 mr-2"></i>
                            <span class="font-medium">多格式支持</span>：不同平台可能需要不同格式（WebP、JPEG、PNG 等）。
                        </div>
                        <div class="flex items-start">
                            <i class="fas fa-bolt text-yellow-500 mt-1 mr-2"></i>
                            <span class="font-medium">CDN 加速</span>：优化图片访问速度，提升用户体验。
                        </div>
                        <div class="flex items-start">
                            <i class="fas fa-crop text-red-500 mt-1 mr-2"></i>
                            <span class="font-medium">动态图片处理</span>：支持裁剪、压缩、水印等功能。
                        </div>
                    </div>
                </div>
            </div>

            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8 card-hover">
                <div class="p-6">
                    <h3 class="text-xl font-semibold mb-4 text-blue-600 flex items-center">
                        <i class="fas fa-cloud mr-2"></i> 2.2 OSS 结合 CDN 进行优化
                    </h3>
                    <p class="text-gray-700 mb-4">OSS + CDN（内容分发网络）是一种 <span class="font-bold">高效、低成本</span> 的图片存储方案：</p>
                    
                    <div class="mermaid mb-6">
                        graph TB
                            A[用户] -->|请求图片| B(CDN节点)
                            B -->|缓存命中| C[返回图片]
                            B -->|缓存未命中| D[OSS源站]
                            D --> E[返回图片并缓存]
                    </div>
                    
                    <div class="bg-blue-50 p-4 rounded-lg mb-6">
                        <ol class="list-decimal pl-5 space-y-2">
                            <li><span class="font-medium">OSS 存储原始图片</span>，避免数据丢失。</li>
                            <li><span class="font-medium">CDN 进行缓存</span>，提高图片加载速度。</li>
                            <li><span class="font-medium">使用 OSS 处理图片</span>，支持 <span class="font-medium">缩放、裁剪、格式转换</span> 等功能，避免服务器额外负担。</li>
                        </ol>
                    </div>

                    <h4 class="font-semibold text-lg mb-2 mt-6 text-gray-800">上传图片至 OSS 并使用 CDN 访问</h4>
                    <div class="code-block p-4 mb-6 rounded-lg overflow-x-auto">
                        <pre class="text-sm"><code>String bucketName = "my-image-bucket";
String objectName = "images/product-123.jpg";
String filePath = "/images/product-123.jpg";

ossClient.putObject(bucketName, objectName, new File(filePath));
String cdnUrl = "https://cdn.example.com/" + objectName;
System.out.println("图片地址: " + cdnUrl);</code></pre>
                    </div>

                    <h4 class="font-semibold text-lg mb-2 mt-6 text-gray-800">2.3 动态图片处理</h4>
                    <p class="text-gray-700 mb-4">OSS 支持<span class="font-bold">按需处理图片</span>，可在 URL 末尾添加参数，如：</p>
                    
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
                        <div class="bg-white border border-gray-200 rounded-lg p-4 shadow-sm">
                            <h5 class="font-semibold text-blue-600 mb-2">缩放</h5>
                            <div class="code-block p-2 rounded">
                                <code class="text-xs">?x-oss-process=image/resize,w_300</code>
                            </div>
                        </div>
                        <div class="bg-white border border-gray-200 rounded-lg p-4 shadow-sm">
                            <h5 class="font-semibold text-blue-600 mb-2">裁剪</h5>
                            <div class="code-block p-2 rounded">
                                <code class="text-xs">?x-oss-process=image/crop,x_100,y_100,w_200,h_200</code>
                            </div>
                        </div>
                        <div class="bg-white border border-gray-200 rounded-lg p-4 shadow-sm">
                            <h5 class="font-semibold text-blue-600 mb-2">加水印</h5>
                            <div class="code-block p-2 rounded">
                                <code class="text-xs">?x-oss-process=image/watermark,text_水印内容</code>
                            </div>
                        </div>
                    </div>
                    
                    <div class="bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-6">
                        <div class="flex">
                            <div class="flex-shrink-0">
                                <i class="fas fa-lightbulb text-yellow-500"></i>
                            </div>
                            <div class="ml-3">
                                <p class="text-sm text-yellow-700">
                                    <span class="font-medium">优化建议：</span> 将常用图片处理结果<span class="font-bold">提前存储</span>，避免每次请求都动态计算。
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Section 3: Backup Solution -->
        <section class="mb-16">
            <div class="flex items-center mb-8">
                <div class="bg-green-100 w-12 h-12 rounded-lg flex items-center justify-center mr-4">
                    <i class="fas fa-database text-green-600 text-xl"></i>
                </div>
                <h2 class="text-3xl font-bold text-gray-800">三、备份方案</h2>
            </div>

            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8 card-hover">
                <div class="p-6">
                    <h3 class="text-xl font-semibold mb-4 text-green-600 flex items-center">
                        <i class="fas fa-exclamation-triangle mr-2"></i> 3.1 数据丢失的常见原因
                    </h3>
                    <div class="grid grid-cols-1 md:grid-cols-3 gap-4">
                        <div class="flex items-start">
                            <i class="fas fa-user-times text-red-500 mt-1 mr-2"></i>
                            <span class="font-medium">人为误操作</span>（误删文件、误覆盖数据）。
                        </div>
                        <div class="flex items-start">
                            <i class="fas fa-server text-gray-500 mt-1 mr-2"></i>
                            <span class="font-medium">存储设备故障</span>（服务器宕机、磁盘损坏）。
                        </div>
                        <div class="flex items-start">
                            <i class="fas fa-shield-alt text-purple-500 mt-1 mr-2"></i>
                            <span class="font-medium">恶意攻击</span>（勒索软件、黑客入侵）。
                        </div>
                    </div>
                </div>
            </div>

            <div class="bg-white rounded-xl shadow-md overflow-hidden mb-8 card-hover">
                <div class="p-6">
                    <h3 class="text-xl font-semibold mb-4 text-green-600 flex items-center">
                        <i class="fas fa-copy mr-2"></i> 3.2 OSS 数据备份策略
                    </h3>
                    
                    <h4 class="font-semibold text-lg mb-2 mt-6 text-gray-800">多地域备份</h4>
                    <p class="text-gray-700 mb-4">可以 <span class="font-bold">使用 OSS 的跨区域复制（Cross-Region Replication）</span>，确保数据在多个地域均有副本，防止单点故障。</p>
                    
                    <div class="mermaid mb-6">
                        graph LR
                            A[主区域 OSS] -->|自动同步| B[备份区域1 OSS]
                            A -->|自动同步| C[备份区域2 OSS]
                    </div>

                    <h4 class="font-semibold text-lg mb-2 mt-6 text-gray-800">配置跨区域复制</h4>
                    <div class="code-block p-4 mb-6 rounded-lg overflow-x-auto">
                        <pre class="text-sm"><code>&lt;ReplicationConfiguration&gt;
    &lt;Role&gt;AliyunOSSRole&lt;/Role&gt;
    &lt;Rule&gt;
        &lt;ID&gt;BackupRule&lt;/ID&gt;
        &lt;Status&gt;Enabled&lt;/Status&gt;
        &lt;Prefix&gt;backup/&lt;/Prefix&gt;
        &lt;Destination&gt;
            &lt;Bucket&gt;backup-bucket&lt;/Bucket&gt;
            &lt;Location&gt;oss-cn-beijing&lt;/Location&gt;
        &lt;/Destination&gt;
    &lt;/Rule&gt;
&lt;/ReplicationConfiguration&gt;</code></pre>
                    </div>

                    <h4 class="font-semibold text-lg mb-2 mt-6 text-gray-800">定期快照备份</h4>
                    <div class="bg-white border border-gray-200 rounded-lg p-4 mb-6">
                        <ul class="list-disc pl-5 space-y-2">
                            <li><span class="font-medium">数据库文件每日备份至 OSS</span>，支持 7 天数据恢复。</li>
                            <li><span class="font-medium">应用数据采用增量备份</span>，减少存储成本。</li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>

        <!-- Summary Section -->
        <section class="bg-indigo-50 rounded-xl p-8 mb-16">
            <h2 class="text-2xl font-bold text-indigo-800 mb-6 text-center">最佳实践总结</h2>
            <div class="grid grid-cols-1 md:grid-cols-3 gap-6">
                <div class="bg-white p-6 rounded-lg shadow-sm">
                    <div class="bg-indigo-100 w-12 h-12 rounded-full flex items-center justify-center mb-4 mx-auto">
                        <i class="fas fa-file-alt text-indigo-600 text-xl"></i>
                    </div>
                    <h3 class="text-lg font-semibold text-center mb-3">日志存储</h3>
                    <ul class="text-gray-700 text-sm space-y-2">
                        <li class="flex items-start">
                            <i class="fas fa-check text-indigo-500 mt-1 mr-2"></i>
                            <span>采用分层存储策略（热/冷数据）</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-indigo-500 mt-1 mr-2"></i>
                            <span>按应用/环境/时间组织存储结构</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-indigo-500 mt-1 mr-2"></i>
                            <span>设置生命周期自动归档/删除</span>
                        </li>
                    </ul>
                </div>
                <div class="bg-white p-6 rounded-lg shadow-sm">
                    <div class="bg-blue-100 w-12 h-12 rounded-full flex items-center justify-center mb-4 mx-auto">
                        <i class="fas fa-image text-blue-600 text-xl"></i>
                    </div>
                    <h3 class="text-lg font-semibold text-center mb-3">图片处理</h3>
                    <ul class="text-gray-700 text-sm space-y-2">
                        <li class="flex items-start">
                            <i class="fas fa-check text-blue-500 mt-1 mr-2"></i>
                            <span>OSS + CDN 加速访问</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-blue-500 mt-1 mr-2"></i>
                            <span>动态处理（缩放/裁剪/水印）</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-blue-500 mt-1 mr-2"></i>
                            <span>预生成常用尺寸减少计算</span>
                        </li>
                    </ul>
                </div>
                <div class="bg-white p-6 rounded-lg shadow-sm">
                    <div class="bg-green-100 w-12 h-12 rounded-full flex items-center justify-center mb-4 mx-auto">
                        <i class="fas fa-database text-green-600 text-xl"></i>
                    </div>
                    <h3 class="text-lg font-semibold text-center mb-3">数据备份</h3>
                    <ul class="text-gray-700 text-sm space-y-2">
                        <li class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <span>跨区域复制防止单点故障</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <span>数据库定期全量备份</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                            <span>应用数据增量备份</span>
                        </li>
                    </ul>
                </div>
            </div>
        </section>
    </main>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-8">
        <div class="container mx-auto max-w-5xl px-4 text-center">
            <div class="mb-4">
                <h3 class="text-lg font-medium text-white mb-2">技术小馆</h3>
                <a href="http://www.yuque.com/jtostring" class="text-indigo-400 hover:text-indigo-300 transition-colors duration-300">http://www.yuque.com/jtostring</a>
            </div>
            <div class="text-sm">
                <p>© 2023 技术小馆. 保留所有权利.</p>
            </div>
        </div>
    </footer>

    <script>
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            }
        });
    </script>
</body>
</html>